import BaseService from './BaseService.js';

class MessageService extends BaseService {
  constructor() {
    super()
    // `$$prefix` 将自动加在 `url` 前面，除非 `url` 是一个绝对 URL
    this.$$prefix = '/v0/message';
    this.$$path = {
    }
  }
  /**分页获取系统消息 */
  listForPage(param){
    return this.post('system', { data: param });
  }
  complain(params) {
    return this.post(`complain/1/10`, { data: params });
  }
  complainById(id) {
    return this.get(`complain/${id}`);
  }
  reply(params) {
    return this.post(`complain/reply`, { data: params });
  }
  queryReply(complainId) {
    return this.get(`complain/reply/${complainId}`);
  }
  /**投诉&售后申请 */
  complaint(params){
    return this.put(`complain`, { data: params })
  }
  doComp(params){
    return this.put(`complain/compensate`, { data: params })
  }
}

export default MessageService;